package org.example.springboot.entity;

import java.util.List;



public class PageEntity<T> {

    //当前页数
    private Integer current;

    //页行数
    private Integer pageSize;

    //总行数
    private Integer total;

    //集合
    private List<T> records;

    public PageEntity() {
    }

    public PageEntity(Integer current, Integer pageSize, Integer total, List<T> records) {
        this.current = current;
        this.pageSize = pageSize;
        this.total = total;
        this.records = records;
    }

    public Integer getCurrent() {
        return current;
    }

    public void setCurrent(Integer current) {
        this.current = current;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public List<T> getRecords() {
        return records;
    }

    public void setRecords(List<T> records) {
        this.records = records;
    }

    @Override
    public String toString() {
        return "PageEntity{" +
                "current=" + current +
                ", pageSize=" + pageSize +
                ", total=" + total +
                ", records=" + records +
                '}';
    }
}
